
package cn.intotw.rdcj.admin.shiro;

import org.apache.shiro.SecurityUtils;

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

public class AnonAndTryLoginFilter extends AutoLoginBaseFilter {
    @Override
    protected boolean isAccessAllowed(ServletRequest request,
                                      ServletResponse response, Object mappedValue) {
        if (!SecurityUtils.getSubject().isAuthenticated()) {
            tryLogin(request, response);
        }
        return true;
    }
}
